import './App.css';
import Login from "./views/login";
import {BrowserRouter as Router, Switch, Route, Redirect} from "react-router-dom";

import React from 'react';
import Chat from "./views/chat";
function App() {
    return (
        <>
            <Router>
                <Switch>
                    <Route path="/login" component={Login}/>
                    <Route path="/chat/:name" component={Chat}/>
                    <Redirect from="/*" to="/login">
                    </Redirect>
                </Switch>
            </Router>
        </>
    );
}

export default App;

